#ifndef __GameManager_h_
#define __GameManager_h_

#include <Ogre.h>
#include "Enemy.h"
#include "Weapon.h"
#include "Bonus.h"

class MainCharacter;
class Bullet;
class Fish;
class CustomObject;


class GameManager : public Ogre::Singleton<GameManager>
{

	// Attributes ------------------------------------------------------------------------------
protected:
	std::map<const char*, Enemy*> enemies;
	std::map<const char*, Bullet*> bullets;
	std::map<const char*, MainCharacter*> maincharacters;
	std::map<const char*, Weapon*> weapons;
	std::map<const char*, Fish*> fishes;

	std::vector<Fish*> unusedFishes;
//	std::vector<Enemy*> unusedEnemies;
	std::multimap<Enemy::TypeEnemy, Enemy*> unusedEnemies;
	std::vector<CustomObject*> unusedCustomObjects;
	std::vector<Bonus*> unusedBonus;

	// Methods ---------------------------------------------------------------------------------
public:
	GameManager(void);
	virtual ~GameManager(void);

	// Factory creator
	Enemy* createEnemy(Enemy::TypeEnemy type);
	MainCharacter* createMainCharacter(void);
	Weapon* createWeapon(enum Weapon::WeaponType _type, enum Weapon::WeaponLevel _level);
	Fish* createFish(void);
	CustomObject* createCustomObject(void);
	Bonus* createBonus(enum Bonus::BonusType _type);

	// Factory destructor
	void destroyEnemy(Enemy*);
	void destroyMainCharacter(MainCharacter*);
	void destroyWeapon(Weapon*);
	void destroyFish(Fish*);
	void destroyCustomObject(CustomObject*);
	void destroyBonus(Bonus*);

	//getter
	std::map<const char*, Enemy*>& getEnemies(){return enemies;}

protected:

};

#endif